/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.upc.clase.demo.dao;

import edu.upc.clase.demo.entity.Comentar;
/*import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;

*
 *
 * @author usuario
 */
public interface ComentarDao {

    //BaseDao base;

    public Integer insertar(Comentar comentar);

    /*public ComentarDao() {
    }

    public Integer insertar(Comentar comentar) throws FulbitoFacilException {
        String insert = "insert into ZCOMMENT(FECREG,NROITEM,IDLOCAL,IDCAN,BOXTEX,CALIF1,CALIF2,CALIF3,CALIF4,CALIF5) "
                + "values (sysdate,?,?,?,?,?,?,?,?,?)";

        List list = new ArrayList();

        //list.add(comentar.getFECREG());
        list.add(comentar.getNROITEM());
        list.add(comentar.getIDLOCAL());
        list.add(comentar.getIDCAN());
        list.add(comentar.getBOXTEX());
        list.add(comentar.getCALIF1());
        list.add(comentar.getCALIF2());
        list.add(comentar.getCALIF3());
        list.add(comentar.getCALIF4());
        list.add(comentar.getCALIF5());

        base = new BaseDao();
        return base.insert(insert, list);
    }

    public Comentar Buscar(Comentar comentar) throws FulbitoFacilException, SQLException {

        String Select = "select nroitem, fecreg, idlocal from ZCOMMENT where nroitem = '" + comentar.getNROITEM() + "' and fecreg = '"
                + comentar.getFECREG() + "'";

        //Select = String.format(Select, alquiler.getNROITEM());

        Comentar comentarRetorno = new Comentar();

        base = new BaseDao();

        ResultSet rs = base.select(Select);

        /*** Recorrer fila a fila el resultado ****
        while (rs.next()) {
            comentarRetorno.setNROITEM(rs.getString("nroitem"));
            comentarRetorno.setFECREG(rs.getString("fecreg"));
            comentarRetorno.setIDLOCAL(rs.getString("idlocal"));
            return comentarRetorno;
        }
        return null;
    }*/
}
